package com.uzai.console.enums;

/**
 * 运营商账户余额变动类型
 * @Auther: liuqi
 * @Date: 2021/8/19 11:22
 * @Description:
 */
public enum MerAccDetailSourceTypeEnum {
    BALANCE_TAKEBAL(-1,"账户余额提现"),
    BALANCE_RECHARGE(0,"账户余额充值"),
    DEVICE_MOBILE_ADD(1,"添加手机端机器人"),
    DEVICE_PC_AUTH(2,"续费机器人"),
    //DEVICE_MOBILE_AUTH(3,"续费手机端机器人"),
    KUAIZHAN_DOMIAN_BUY(4,"购买快站域名"),
    PRODUCT_AUTH(5,"购买功能模块"),
    EXPORT_INFO(6,"导出查询结果"),
    SMS_PAY(7,"短信扣费"),
    GOD_PAY(8,"官方扣款"),
    GOD_RECHARGE(9,"官方充值"),
    WXPUB_AUTH(10,"续费公众号"),
    WXWORK_AUTH(11,"续费企业微信"),
    TB_EXCLUSIVE_GOODS_PAY(12,"定向商品扣款"),
    KUAIZHAN_DOMIAN_REBUY(13,"续费快站域名"),
    MD_REWARDS(14,"免单奖励"),
    MD_REWARDS_RECOVERY(15,"免单奖励回收"),
    MOBILE_RECHARGE(16,"手机话费充值"),
    REAL_NAME_VERIFICATION(17,"实名认证扣费"),

    REAL_NAME_CONTRACT_SIGN(18,"实名签署扣费"),

    ;

    private Integer id;
    private String desc;

    MerAccDetailSourceTypeEnum(Integer id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static MerAccDetailSourceTypeEnum getById(Integer id) {
        if (id == null) {
            return null;
        }
        for (MerAccDetailSourceTypeEnum type: MerAccDetailSourceTypeEnum.values()) {
            if (type.getId().intValue() == id.intValue()) {
                return type;
            }
        }
        return null;
    }
}
